<!-- 我的列表 -->

<template>
  <WebShow class="full">
    <RollList v-if="list.length">
      <div v-for="item in list" :key="item.id" class="flexCC">
        <img :src="borderImg" />

        <ShowPhoto :one="item" bind="alarmImg" :empty="emptyImg" noLabel cover />

        <div class="flex flexCol" @click="windowDetail(item)">
          <div>
            <b class="ellips">{{ item.alarmTypeName }}</b>
            <div :class="`SecureOverview-RightAlarm-level${item.alarmLevelId}`">{{ item.alarmLevelName }}</div>
          </div>
          <div class="ellips">{{ item.alarmDetail }}</div>
          <div>{{ CORE.timeStr(item.alarmTime) }}</div>
          <!-- <div>{{ CORE.REGION.NAME[item.areaId] }}</div> -->
          <div class="ellips2">{{ item.areaName }}</div>
        </div>
      </div>
    </RollList>

    <el-empty v-else-if="readyList" :description="`暂无${CORE.MAP.ALARM}`" />
  </WebShow>
</template>

<script>
// ============================== 导入依赖 ============================== //

import mixDetailToTable from '@admin/components/detail/mixDetailToTable'
import UTIL from '../../UTIL'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyList',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [mixDetailToTable('', 'DetailAlarm')],

  /**
   * 计算属性 (慎用箭头函数)
   */
  computed: {
    /**
     * 边框图片
     */
    borderImg: () => UTIL.getImg('border-alarm'),

    /**
     * 空白图片
     */
    emptyImg: () => UTIL.getImg('alarm-empty', 'svg'),
  },
}
</script>
